import request from '@/utils/request'
import qs from 'qs'

export function untreatedOrder(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/notify/undeal',
    method: 'get',
    params: data
  })
}
export function treatedOrder(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/deal',
    method: 'post',
    data: qs.stringify(data)
  })
}

export function getAudio(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/video',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function orderList(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/lists',
    method: 'GET',
    params: data
  })
}
export function roomList(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/roomLists',
    method: 'GET',
    params: data
  })
}
export function chargeOffOne(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/write_off/finish',
    method: 'POST',
    data: qs.stringify(data)
  })
}
export function orderDetail(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/detail',
    method: 'get',
    params: data
  })
}

export function orderAccept(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/accept',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function chargeOff(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/write_off/finish',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function afterSale(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/dealRefund',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function leaveStore(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/leaveShop',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function roomDetail(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/roomDetail',
    method: 'get',
    params: data
  })
}
export function roomAccept(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/confirm',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function chargeOffList(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/checkLists',
    method: 'get',
    params: data
  })
}
export function saleAfterOrder(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/order/refundLists',
    method: 'get',
    params: data
  })
}
export function storevalueOrder(params) {
  const data = {
    ...params
  }
  return request({
    url: 'merchant/finance/deposit',
    method: 'get',
    params: data
  })
}
export function storevalueOrderList(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/finance/lists',
    method: 'get',
    params: data
  })
}

export function offlineOrder(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/finance/checkout',
    method: 'get',
    params: data
  })
}
export function settlementList(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/finance/index',
    method: 'get',
    params: data
  })
}
